window = global;
require("./加载器.js")
require("./模块.js")
var sign = window.long;
function getIvd(message) {  
  // 定义RSA公钥  
  const publicKey = '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkof1rwl+U32URzw5lqqy\nz4E+aKwu+f+A6/aSNvnSe62m6r/rjyb9WiRs7E1jfibgU196GNFX1+XxRaATFkTI\n9Mzapr8qn+yR3b/xWAECU7PCR366ovhHSJlIozmmkkb1kwjdR6okUWKIHg7heq9v\nz9cExuvN+whHjDjSKAQX9/1Sqv3py/Yo9+MkRC8Q5KhupYBBmgLAUtqL6ghU3HS6\nNnwx2CA13RyonLDB+Dh59l+j11Rf85ANL4XrD7dxCDsCFvjTBGIYm41F3qHne0fu\nXPKTsamLHjkiMV3NPxVAlMQXUF71ZoSEO4cITaZZCpI5H9GSh16ZebBtSC6RSvek\npQIDAQAB\n-----END PUBLIC KEY-----';  

  try {  
      // 获取RSA公钥实例  
      const rsaPublicKey = sign(88440).publicKeyFromPem(publicKey);  
      // 加密消息  
      const encrypted = rsaPublicKey.encrypt(message);
      // Base64编码  
      const result = sign(94802).encode64(encrypted);  
      
      return result;  
  } catch (error) {  
      console.error('error:', error);  
      return null;  
  }  
}  

var data = '{"page":"5","query":"newest","size":"30","timestamp":1734921013}';  
// const data = '{"query":"sf_navbar","size":"1","timestamp":1734928996}';  

var ivd = getIvd(data);  
console.log(ivd);